﻿@using PerformanceBll.Enum
@{
    ViewData["Title"] = "Deskp";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var info = ViewBag.data;
}

<div>
    <div class="col-sm-6">
        <div class="widget-box">
            <div class="widget-header">
                <h4 class="smaller">系统基本情况</h4>
            </div>

            <div class="widget-body">
                <div class="widget-main">
                    <div class="infobox infobox-blue2">
                        <div class="infobox-progress">
                            <div class="easy-pie-chart percentage" data-percent="@((info[Enum_MonitoringType.mem]))" data-size="46" style="height: 46px; width: 46px; line-height: 45px;">
                                <span class="percent">@((info[Enum_MonitoringType.mem]))</span>%
                                <canvas height="46" width="46"></canvas>
                            </div>
                        </div>

                        <div class="infobox-data">
                            <span class="infobox-text">已用内存</span>
                            <div class="infobox-content">
                                <span class="bigger-110">~</span>
                                @((info[Enum_MonitoringType.allmen]))
                            </div>
                        </div>
                    </div>

                    <div class="infobox infobox-blue2">
                        <div class="infobox-progress">
                            <div class="easy-pie-chart percentage" data-percent="@((info[Enum_MonitoringType.cpu]))" data-size="46" style="height: 46px; width: 46px; line-height: 45px;" id="cpu">
                                <span class="percent">@((info[Enum_MonitoringType.cpu]))</span>%
                                <canvas height="46" width="46"></canvas>
                            </div>
                        </div>

                        <div class="infobox-data">
                            <span class="infobox-text">已用CPU</span>
                            <div class="infobox-content">
                                <span class="bigger-110">~</span>
                               100
                            </div>
                        </div>
                    </div>

                    <div class="infobox infobox-green">
                        <div class="infobox-progress">
                            <div class="easy-pie-chart percentage" data-percent="@((info[Enum_MonitoringType.disk]))" data-size="46" style="height: 46px; width: 46px; line-height: 45px;">
                                <span class="percent"> @((info[Enum_MonitoringType.disk]))</span>%
                                <canvas height="46" width="46"></canvas>
                            </div>
                        </div>

                        <div class="infobox-data">
                            <span class="infobox-text">已用磁盘(挂载)</span>
                            <div class="infobox-content">
                                <span class="bigger-110">~</span>
                                @((info[Enum_MonitoringType.alldisk]))
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-6">
        <div class="widget-box">
            <div class="widget-header">
                <h4 class="smaller">进程排名</h4>
            </div>

            <div class="widget-body">
                <div class="widget-main" style="overflow: hidden">
                    <div class="col-xs-13">
                        <div class="progress pos-rel" data-percent="100%">
                            <div class="progress-bar" style="width:100%;"><span style="float:left;left:1em">mongod</span></div>
                            <div></div>
                        </div>

                    </div>
                    <div class="col-xs-8">
                        <div class="progress pos-rel" data-percent="66%">
                            <div class="progress-bar" style="width:66%;"></div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="widget-box">
            <div class="widget-header">
                <h4 class="smaller">Popovers</h4>
            </div>

            <div class="widget-body">
                <div class="widget-main">
                    fssa
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    Getmonitoring();
    function Getmonitoring() {
        $.ajax({
            type: "POST",
            url: "/Client/Getmonitoring", //用与处理ajax的地址及函数
            success: function (result) {
                debugger;
                $("#cpu").attr("data-percent", 100)
            },
            error: function (xhr, msg, e) {

            }
        });
    }
</script>
